For Windows
Download Java JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html and install. Note that JDK contains JRE. Modify the following environment variables:
- add JAVAHOME D:\Program Files (x86)\Java\jdk1.7.051
- add Path %JAVA_HOME%\bin;\%JAVA_HOME%\jre\bin;
- add CLASSPATH %JAVA_HOME%\lib\tools.jar;%JAVA_HOME%\jre\lib\rt.jar
Download Eclipse from http://www.eclipse.org/downloads/ and click eclipse.exe
For Linux
Install JDK
1
2
3
4sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update // depending on the needed java version
sudo apt-get install openjdk-7-jdk
or sudo apt-get install openjdk-8-jre openjdk-8-jdkDownload Eclipse and unpack
Create a new file eclipse.desktop in /usr/share/applications/ and add the below code
1
2
3
4
5
6
7
8[Desktop Entry]
Name=Eclipse
Comment=Eclipse IDE
Exec=/home/liniu/Program_Files/Eclipse/eclipse/eclipse
Icon=/home/ivan/Eclipse/icon.xpm
Categories=Application;Development;Java;IDE
Type=Application
Terminal=0and then run
1
sudo desktop-file-install /usr/share/applications/eclipse.desktop
Add to the path:
sudo ln -s /opt/eclipse/eclipse /usr/local/bin/